package com.yingran.beiqi.activity.mapbox

import android.os.Bundle
import com.mapbox.mapboxsdk.maps.MapboxMap
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback
import com.yingran.beiqi.R
import com.yingran.beiqi.activity.BaseActivity
import kotlinx.android.synthetic.main.activity_navigation.*


class NavigationActivity : BaseActivity(), OnMapReadyCallback {
    override fun onMapReady(mapboxMap: MapboxMap) {
        this.mapboxMap = mapboxMap
    }

    var mapboxMap: MapboxMap? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_navigation)
        mapView.onCreate(savedInstanceState)
        mapView.getMapAsync(this@NavigationActivity)
    }


    override fun onStart() {
        super.onStart()
        mapView.onStart()
    }

    override fun onResume() {
        super.onResume()
        mapView.onResume()
    }

    override fun onPause() {
        super.onPause()
        mapView.onPause()
    }

    override fun onStop() {
        super.onStop()
        mapView.onStop()
    }

    override fun onLowMemory() {
        super.onLowMemory()
        mapView.onLowMemory()
    }

    override fun onDestroy() {
        super.onDestroy()
        mapView.onDestroy()
    }

    override fun onSaveInstanceState(outState: Bundle) {
        super.onSaveInstanceState(outState)
        mapView.onSaveInstanceState(outState)
    }


}